/*
 * @Author: WHAlex
 * @Date: 2025-01-17 11:11:17
 *
 * Copyright (c) 2025 by atguigu, All Rights Reserved.
 */
#ifndef __INF_ES8311_H__
#define __INF_ES8311_H__

// 当前项目选择使用老的I2C驱动,原因在于后续摄像头驱动只能使用老的
#include "driver/i2c.h"

#include "driver/i2s_std.h"
#include "driver/i2s_tdm.h"
#include "soc/soc_caps.h"

#include "esp_codec_dev.h"
#include "esp_codec_dev_defaults.h"

#define SOUND_I2C_SDA_PIN 0
#define SOUND_I2C_SCL_PIN 1

#define SOUND_I2S_BCK_PIN 2
#define SOUND_I2S_MCK_PIN 3
#define SOUND_I2S_DATA_IN_PIN 4
#define SOUND_I2S_DATA_WS_PIN 5
#define SOUND_I2S_DATA_OUT_PIN 6

#define SOUND_PA_PIN 46

void Inf_ES8311_Init(void);

esp_err_t Inf_ES8311_WriteData(char *data, size_t len);

esp_err_t Inf_ES8311_ReadData(uint8_t data[], size_t len);

#endif
